﻿using System;
using System.Collections.Generic;

using System.Text;
using QUANLYCHAMCONG.DAO.DAO;
using QUANLYCHAMCONG.BL.Entities;
using System.Data;

namespace QUANLYCHAMCONG.BL.BUS
{
    public class LOAIMAYBUS
    {
        public LOAIMAYBUS() { }
        public static bool Insert(LOAIMAY lm)
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return dao.Insert(lm);
        }
        public static bool Update(LOAIMAY lm)
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return dao.Update(lm);
        }
        public static bool Delete(LOAIMAY lm)
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return dao.Delete(lm);
        }
        public static DataTable SelectAll()
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return dao.SelectALL();
        }
        public static DataTable SelectPK(LOAIMAY lm)
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return dao.SelectByPK(lm);
        }
        public static string GetID()
        {
            LOAIMAYDAO dao = new LOAIMAYDAO();
            return "LM" + dao.GetID().ToString();
        }
    }
}
